package exrefelect;

/**
 * @author: knowno
 * @create: 2025-09-17 14:26
 * @Version 1.0
 **/
public class TestClass {
    public static void main(String[] args) {
        //Class类的使用
        //package java.lang;
        //1 通过类名.class
        Class cls1 = TestClass.class;
        //2 对象名.getClass
        TestClass testClass = new TestClass();
        Class cls2 = testClass.getClass();
        //3 Class.forName("全类名")
        try {
            Class cls3 = Class.forName("exrefelect.TestClass");
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
        
    }
}
